//
//  PPushController.swift
//  CJPack
//
//  Created by 陈警卫 on 2023-04-23.
//

import UIKit

class PPushController: CJBaseBackController {
    
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        
        setupNavBarApperance(backColor: .red)
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        setupView()
    }
    
    func setupView() {
        let btn = UIButton(type: .custom)
        view.addSubview(btn);
        btn.frame = CGRect(x: 20, y: CJScreen.navBatBarHeight + 30, width: 50, height: 30)
        btn.setTitle("push", for: .normal)
        btn.setTitleColor(.red, for: .normal)
        btn.addTarget(self, action: #selector(btnPushAction), for: .touchUpInside)
    }
    
    @objc func btnPushAction() {
        let vc = PPush2Controller()
        navigationController?.pushViewController(vc, animated: true)
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
